alter table jms_dm.dm_tab_transfer_mail_waybill_detail_dt set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_tab_transfer_mail_waybill_detail_dt;
create table if not exists jms_dm.dm_tab_transfer_mail_waybill_detail_dt
(
    bill_code          string comment ' 运单',
    scan_site_code     string comment '扫描站点code',
    input_site         string comment '录入部门',
    agent_code         string comment '代理区code',
    agent_name         string comment '代理区名称',
    scan_time          string comment '扫描时间',
    scan_user_code     string comment '扫描员',
    scan_user          string comment '扫描员名称',
    arr_scan_time      string comment '邮政到件时间',
    sig_scan_time      string comment '邮政签收时间',
    sig_scan_site_code string comment '签收网点',
    scan_site          string comment '签收网点',
    del_falg           int comment '1打标0未达标 关联上说明打标,关联不上的未打标,',
    arr_falg           int comment '1邮政到件0未邮政到件 关联上说明邮政/菜鸟,关联不上的未非邮政的',
    sig_falg           int comment '1签收0未签收 关联上说明签收,关联不上的未签收',
    cnyz_sig_falg      int comment '1邮政签收0未邮政签收 关联上说明邮政/菜鸟,关联不上的未非邮政的',
    date_time          string comment '日期',
    remark1            string comment '备用',
    remark2            string comment '备用'
)
    comment '转邮监控明细'
    partitioned by (dt string comment '扫描时间yyyy-MM-dd')
    stored as parquet
    location '/dw/hive/jms_dm.db/external/dm_tab_transfer_mail_waybill_detail_dt'
;

